home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / SAS-C / sc655pch / guiprof / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-26  |  1.5 KB  |  128 lines

  1. #include <stdio.h>
  2. #include <dos.h>
  3.  
  4. #define FACTOR 5
  5.  
  6. #define CALL(func,x) for(i=0; i<((x)*FACTOR); i++) (func)();
  7.  
  8. #define DELAY for(i=0; i<100*FACTOR; i++)
  9.  
  10. void Long_Name(void)
  11. {
  12. }
  13.  
  14. void This_Is_A_Really_Really_REALLY_Long_Name(void)
  15. {
  16. }
  17.  
  18. static void f100static(void)
  19. {
  20.    int i;
  21.    DELAY;
  22. }
  23.  
  24. void f100(void)
  25. {
  26.    //int i;
  27.    //DELAY;
  28. }
  29.  
  30. void f100b(void)
  31. {
  32.    int i;
  33.    DELAY;
  34. }
  35.  
  36. void f100c(void)
  37. {
  38.    int i;
  39.    DELAY;
  40. }
  41.  
  42. void f200(void)
  43. {
  44.    int i;
  45.    DELAY;
  46. }
  47.  
  48. void f300(void)
  49. {
  50.    int i;
  51.    DELAY;
  52. }
  53.  
  54. void f3x100(void)
  55. {
  56.    int i;
  57.    CALL(f100b,100);
  58. }
  59.  
  60. void f100x3(void)
  61. {
  62.    f100c();
  63.    f100c();
  64.    f100c();
  65. }
  66.  
  67. void one(void){}
  68. void two(void){}
  69. void three(void){}
  70. void four(void){}
  71. void five(void){}
  72. void six(void){}
  73. void seven(void){}
  74. void eight(void){}
  75. void nine(void){}
  76. void ten(void){}
  77.  
  78. #if !SMALLTEST
  79. int main(int argc, char *argv[])
  80. {
  81.    int i;
  82.    //for(i=0; i<argc; i++) printf("%s\n", argv[i]);
  83.    //printf("Hit a character, then RETURN: ");
  84.    //scanf("\n", &i);
  85.    one(); 
  86.    two(); 
  87.    three();
  88.    four();
  89.    five();
  90.    six();
  91.    seven();
  92.    eight();
  93.    nine();
  94.    ten();
  95.    Long_Name();
  96.    This_Is_A_Really_Really_REALLY_Long_Name();
  97.    chkabort();
  98.    CALL(f100static, 100);
  99.    CALL(f100,100);
  100.    CALL(f200,200);
  101.    CALL(f300,300);
  102.    CALL(f3x100,3);
  103.    CALL(f100x3,100);
  104.    return(0);
  105. }
  106.  
  107. #else
  108. int main(int argc, char *argv[])
  109. {
  110.    //int i;
  111.    //for(i=0; i<argc; i++) printf("%s\n", argv[i]);
  112.    one(); 
  113.    two(); 
  114.    three();
  115.    four();
  116.    five();
  117.    six();
  118.    seven();
  119.    eight();
  120.    nine();
  121.    ten();
  122.    f100();
  123.    f200();
  124.    f300();
  125.    return 0;
  126. }
  127. #endif
  128.